<div class="page-body">
    <a class="btn btn-default purple" href="{:U('edit')}" style="margin-bottom: 15px;"><i class="fa fa-plus"></i>
        新增卡种
    </a>
    <a class="btn btn-default purple" href="{:U('export')}" style="margin-bottom: 15px;"><i class="glyphicon glyphicon-cloud-download"></i>
        导出会员卡类型
    </a>
    <div class="row">
        <div class="col-xs-12 col-md-12">
            <div class="widget">
                <div class="widget-header ">
                    <span class="widget-caption">卡种类型</span>
                    <div class="widget-buttons">
                        <a href="#" data-toggle="maximize">
                            <i class="fa fa-expand"></i>
                        </a>
                        <a href="#" data-toggle="collapse">
                            <i class="fa fa-minus"></i>
                        </a>
                        <a href="#" data-toggle="dispose">
                            <i class="fa fa-times"></i>
                        </a>
                    </div>
                </div>
                <div class="widget-body">
                    <table class="table table-striped table-hover">
                        <thead>
                        <tr>
                            <th>
                                ID
                            </th>
                            <th>
                                名称
                            </th>
                            <th>
                                有效时间
                            </th>
                            <th>
                                {:C('rent_freenum_name')}
                            </th>
                            <th>
                                {:C('act_freenum_name')}
                            </th>
                            <th>
                                活动报名费折扣
                            </th>
                            <th>
                                购书折扣
                            </th>
                            <th>
                                面值
                            </th>
                            <th>
                                操作
                            </th>
                        </tr>
                        </thead>

                        <tbody>
                        <foreach name="data" item="v">
                            <tr>
                                <td>
                                    {$v.type_id}
                                </td>
                                <td>
                                    {$v.name}
                                    <eq name="v.wx_show" value="1">
                                        <span class="label label-success graded">微信</span>
                                    </eq>
                                </td>
                                <td>
                                    <span class="badge badge-maroon">
                                        {$v.month}
                                    </span>
                                    个月
                                </td>
                                <td>
                                    <span class="badge badge-orange badge-square">
                                        {$v.num_delivery}
                                    </span>
                                </td>
                                <td>
                                    <span class="badge badge-orange badge-square">
                                        {$v.num_activity}
                                    </span>
                                </td>
                                <td>
                                    <span class="badge badge-orange badge-square">
                                        {$v.discount_apply}
                                    </span>
                                </td>
                                <td>
                                    <span class="badge badge-orange badge-square">
                                        {$v.discount_buy}
                                    </span>
                                </td>
                                <td>
                                    ￥{$v.price}
                                </td>
                                <td>
                                    <a class="btn btn-danger btn-xs del-btn" href="javascript:;"
                                       data-href="{:U('del',array('type_id'=>$v['type_id']))}"><i
                                            class="fa fa-trash-o"></i></a>
                                    <a class="btn btn-info btn-xs"
                                       href="{:U('edit',array('type_id'=>$v['type_id']))}">
                                        <i class="fa fa-edit"></i> 编辑
                                    </a>
                                </td>
                            </tr>
                        </foreach>
                        </tbody>
                    </table>
                    {$page}
                </div>
            </div>
        </div>
    </div>
</div>